import {Request} from '../../api/request'
import global from '../../utils/global'
// + '/saaswesure'
const request = new Request(global.baseUrl )
// 新保险接口 和 日日保接口一样 只不过不在一个包中 所以复制一份

// 申请投保追加时间
export function addWesureTime (data){
    return request.post('/api/v1/pay/company-supplier/wesure-time/add-wesure-time', data).then(res => {
        return res.data.data
    })
}

// 国寿财账单导出
export function exportBillGsc(data){
    return request.post('/api/v1/pay/worker-project-record/export-gsc-bill', data).then(res => {
        return res.data.data
    })
}

// 当前在保人员tab 
export function inInsurancePersonnel (data){
    return request.get('/api/v1/wesureInsureRecord/insure-type', data).then(res => {
        return res.data.data
    })
}

// 当前在保人员list 
export function inInsurancePersonnelList (data){
    return request.get('/api/v1/wesureInsureRecord/guarantee-list', data).then(res => {
        return res.data.data
    })
}

// 充值记录查询
export function getInsuranceRechargeDetail(data){
    return request.get('/api/v1/wesure-handle/recharge-detail', data).then(res => {
        return res.data.data
    })
}

// 确认投保
export function determineInsure(data) {
    return request.post('/api/v1/wesureInsureRecord/confirm-insure', data).then((res) => {
        return res.data.data
    })
}

// 国寿财手动添加员工
export function manualAddWorker(data){
    return request.post('/api/v1/pay/worker-project-record/add-to-gsc-project', data).then(res => {
        return res.data.data
    })
}

// 添加投保企业列表
export function addInsuranceEnterprise(data){
    return request.post('/api/v1/pay/company-supplier/add-wesure-server-company', data).then(res => {
        return res.data.data
    })
}

// 生成二维码时缓存信息
export function saveQrcodeCache(data){
    return request.post('/api/v1/pay/project/save-cache', data).then(res => {
        return res.data.data
    })
}

// 微保充值记录
export function getInsuranceRecharge(data){
    return request.get('/api/v1/wesure-handle/list', data).then(res => {
        return res.data.data
    })
}

// 微保充值
export function insuranceRecharge(data){
    return request.post('/api/v1/wesure-handle', data).then(res => {
        return res.data.data
    })
}

// 公对公长期工充值
export function longAddRechargeRecord(data){
    return request.post('/api/v1/pay/period-insur/account-balance/add-recharge-record', data).then(res => {
        return res.data.data
    })
}


// 根据公司id查询出险人员
export function insuranceReportList(data) {
    return request.get('/api/v1/pay/wesure-report-case/out-danger-info', data).then(res => {
        return res.data.data
    })
}

// 新增在线报案
export function establishCase(data) {
    return request.post('/api/v1/pay/wesure-report-case/report-case', data).then(res => {
        return res.data.data
    })
}

// 查询微保投保人员信息
export function queryUserInfo(data) {
    return request.get('/api/v1/pay/wesure-report-case/out-danger-user-info', data).then(res => {
        return res.data.data
    })
}

// 根据案件id获取案件详情 
export function insuranceReportDetail(data) {
    return request.get('/api/v1/pay/wesure-report-case/out-danger-detail', data).then(res => {
        return res.data.data
    })
}

// 根据案件id撤销报案
export function revokeReportCase(data) {
    return request.get('/api/v1/pay/wesure-report-case/revoke-report-case', data).then(res => {
        return res.data.data
    })
}

// 投保企业管理撤销
export function companySupplierRevoke (data){
    return request.put('/api/v1/pay/company-supplier/cancel', data).then(res => {
        return res.data.data
    })
}

// 查询投保企业信息接口
export function insuranceWesureInfo (data){
    return request.get('/api/v1/pay/company-supplier/wesure-info', data).then(res => {
        return res.data.data
    })
}

// 删除投保企业 
export function deleteInsureEnterprise(data){
    return request.put('/api/v1/pay/company-supplier/delete-wesure-server-company', data).then(res => {
        return res.data.data
    })
}

// 删除保险记录
export function deleteInsuranceGsc(data) {
    return request.put('/api/v1/pay/project/delete-project-GSC', data).then(res => {
        return res.data.data
    })
}

// 国寿财投保账单列表
export function getInsuranceBillListGsc(data) {
    return request.get('/api/v1/pay/project/wesure-project-bill', data).then(res => {
        return res.data.data
    })
}

// 首页查询保费余额和当前在保保单头部
export function guaranteedCount(data) {
    return request.get('/api/v1/wesureInsureRecord/guaranteed-count', data).then(res => {
        return res.data.data
    })
}
// 查询长期工余额接口
export function getInsureData (data){
    return request.get('/api/v1/pay/period-insur/company/period-data-port', data).then(res => {
        return res.data.data
    })
}
// 长期工保险充值 列表接口
export function getIongInsuranceRechargeDetail(data){
    return request.get('/api/v1/pay/period-insur/account-balance/list', data).then(res => {
        return res.data.data
    })
}
// 保险首页查询投保账单list
export function insureListState(data) {
    return request.get('/api/v1/wesureInsureRecord/list-state', data).then(res => {
        return res.data.data
    })
}
// 保险查询投保项目list
export function insureRecordsList(data) {
    return request.get('/api/v1/pay/project/wesure-project', data).then(res => {
        return res.data.data
    })
}
// 查看投保企业的时间
export function getInsuranceCompanyTime(data) {
    return request.get('/api/v1/pay/company-supplier/info', data).then(res => {
        return res.data.data
    })
}
// 查询投保企业列表
export function getInsuranceEnterprise(data) {
    return request.get('/api/v1/pay/company-supplier/server-company-open-wesure', data).then(res => {
        return res.data.data
    })
}
// 添加投保企业列表gsc
export function addInsuranceEnterpriseGsc(data) {
    return request.post('/api/v1/pay/company-supplier/add-wesure-server-company-gsc', data).then(res => {
        return res.data.data
    })
}

// 检测投保记录列表是否发生改变
export function changeInsureRecordsCount(data){
    return request.get('/api/v1/pay/project/wesure-project-count',data).then(res=>{
        return res.data.data
    })
}

// 获取方案列表 
export function getInsurePlan(data){
    return request.get('/api/v1/wesure-industry-plan/list',data).then(res=>{
        return res.data.data
    })
}

// 方案介绍图片
export function getIntroduceImg(data){
    return request.get('/api/v1/config/wesure/plan',data).then(res=>{
        return res.data.data
    })
}

// 发薪记录详情信息 /api/v1/pay/company/recharge-detail
export function getRechargeDetailInfo(data){
    return request.get('/api/v1/pay/company/recharge-detail',data).then(res=>{
        return res.data.data
    })
}

// 长期保险日日保账户余额 /api/v1/pay/period-insur/account-balance/info
export function getInsuranceBalance(data){
    return request.get('/api/v1/pay/period-insur/account-balance/info',data).then(res=>{
        return res.data.data
    })
}

// 微保余额 转出至 长期保险余额 /api/v1/wesure-handle/transfer-to-period
export function transferToPeriod(data){
    return request.post('/api/v1/wesure-handle/transfer-to-period', data).then(res => {
        return res.data.data
    })
}

// 长期保险余额 转出至 微保余额 /api/v1/pay/period-insur/account-balance/transfer-to-wesure
export function transferToWesure(data){
    return request.post('/api/v1/pay/period-insur/account-balance/transfer-to-wesure', data).then(res => {
        return res.data.data
    })
}

// 电子签操作记录 /api/v2/ele-sign/account/recharge-detail
export function getContractDetailInfo(data){
    return request.get('/api/v2/ele-sign/account/recharge-detail',data).then(res=>{
        return res.data.data
    })
}

// 长期保险余额充值凭证（公对公） /api/v1/pay/period-insur/account-balance/add-recharge-record
export function addLongTermRecharge(data){
    return request.post('/api/v1/pay/period-insur/account-balance/add-recharge-record', data).then(res => {
        return res.data.data
    })
}

// 导入发薪项目人员 api/v1/pay/worker-project-record/add-from-project
export function addFromProject(data) {
  return request.post('/api/v1/pay/worker-project-record/add-from-project', data).then((res) => {
      return res.data.data
  })
}
// 发薪项目详情信息
export function getProjectDetailInfo(data){
  return request.get('/api/v1/pay/project/info', data).then(res=>{
      return res.data.data
  })
}
// 发薪项目详情列表
export function getPayDetailList(data){
  return request.get('/api/v1/pay/worker-project-record/worker-list',data).then(res=>{
      return res.data.data
  })
}

// 再次快捷投保
export function expressInsurance(data){
    return request.post('/api/v1/pay/project/copy-wesure-prj-staff',data).then(res=>{
        return res.data.data
    })
}

// 检测日日保 当前人员是否 已创建出险
export function testingDanger(data){
    return request.get('/api/v1/pay/wesure-report-case/get-report-case',data).then(res=>{
        return res.data.data
    })
}
  
// 风险信息
export function getInsuranceRisk(data){
    return request.get('/api/v1/insur-com-company/get-daliy-insur-risk',data).then(res=>{
        return res.data.data
    })
}

// 团意日保 投保接口
export function determineMicroInsure(data){
    return request.post('/api/v1/wesureInsureRecord/to-insure-by-project-id',data).then(res=>{
        return res.data.data
    })
}

// 项目时间到期查询 
export function getCheckInsuranceExpiration(data){
    return request.get('/api/v1/gsc/project/get-wesure-left-info',data).then(res=>{
        return res.data.data
    })
}

// 提交开通团意保 信息 
export function applyGroupPolicy(data){
    return request.post('/api/v1/pay/company/operator/info',data).then(res=>{
        return res.data.data
    })
}

// 获取团意保 充值银行号 
export function getTyxChargeAccount(data){
    return request.get('/api/v1/pay/company/tyx-charge-account',data).then(res=>{
        return res.data.data
    })
}